/***************************************************************************
 *   This is a part of the NextCAD Web APP.                                *
 *   Copyright (C) AMCAX, All rights reserved.                             *
 ***************************************************************************/
/*
 * @Descripttion:
 * @version: 1.0.0
 * @Author: YinJianFeng
 * @Date: 2024-03-29 16:24:47
 */
import { BaseCommand, cadAppLog } from '@amcax/base';
import { ctx2 } from '@app-cad/module';

// 自适应窗体

const fnInvoke = () => {
  cadAppLog('fitView !!!!', ctx2.viewer);
  ctx2.viewer.sceneSetup.setToHomeView(400);
  return null;
};
const fnDestory = () => {};

export const cmdFitView: BaseCommand = {
  id: 'CmdFitView',
  label: 'command.fitView',
  icon: 'commands/feature/fit-screen',
  invoke: fnInvoke,
  destory: fnDestory,
  standalone: true,
};
